$(function(){

$("#submit").click(function(){
	
	if(!submitValidate()){//不匹配时，不用
//		alert("不匹配 ")
		return;
	}
//	alert("匹配");
	url_addUser = "oa-user/tbUserAction_addUser.action";
	
	req_addUser = {
		'tbUser.tbUserId':$("#uId").attr("value"),
		'tbUser.name':$("#uName").attr("value"),
		'tbUser.password':$("#uPassword").attr("value"),
		'tbUser.mobilephone':$("#uPhone").attr("value"),
		'tbUser.telephone':$("#uTel").attr("value"),
		'tbUser.email':$("#uMail").attr("value"),
		'tbUser.fax':$("#uFax").attr("value"),
		
		'deptId':$("#dept").attr("value"),
		'roleId':$("#roleId").text()//这个角色不应该只限一个,要修改
		
	};
	
	$.post(url_addUser,req_addUser,function(data){
		alert(data.result);
		location.href="oa/user/users.jsp";
	});
	
});

});




